﻿using System.Collections;
using System.Collections.Generic;

namespace VirtualTournaments.Business.Tournaments
{
	public class Journey : IEnumerable<Match>
	{
		private List<Match> _matches;

		public Journey()
		{
			_matches = new List<Match>();
		}

		public int Number { get; set; }

		protected virtual List<Match> Matches
		{
			get { return _matches; }
			set { _matches = value; }
		}

		public void AddMatch(Match match)
		{
			Matches.Add(match);
		}

		public IEnumerator<Match> GetEnumerator()
		{
			return Matches.GetEnumerator();
		}

		IEnumerator IEnumerable.GetEnumerator()
		{
			return Matches.GetEnumerator();
		}
	}
}
